'use strict';
// 热门 搜索
module.exports = app => {
    const { STRING, INTEGER, DATE, ENUM } = app.Sequelize;
    // 配置（重要：一定要配置详细，一定要！！！）
    const Hot = app.model.define('hot', {
        id: {
            type: INTEGER(30).UNSIGNED,
            primaryKey: true,
            autoIncrement: true
        },
        name: {
            type: STRING(200),
            allowNull: false,
            defaultValue: '',
            comment: '关键词',
        },
        sort: {
            type: INTEGER(30),
            allowNull: false,
            defaultValue: '1',
            comment: '排序 越小越前',
        },
        statr_time: {
            type: DATE,
            allowNull: false,
            defaultValue: 0,
            comment: '开始时间',
        },
        end_time: {
            type: DATE,
            allowNull: false,
            defaultValue: 0,
            comment: '结束时间',
        },
        type: {
            type: ENUM,
            values: ['0', '1',],
            allowNull: false,
            defaultValue: '1',
            comment: '状态 0自然 1自定义 '
        },
        operation: {
            type: STRING(20),
            allowNull: false,
            defaultValue: '0',
            comment: '操作者',
        },

        created_at: DATE,
        updated_at: DATE,
    });
    return Hot;
};